<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\Excel\ExportController;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});
Route::get('/export/image',[ExportController::class,'list']);
//微信开发


Route::group(['middleware' => ['web', 'wechat.oauth']], function () {
    Route::get('user', [\App\Http\Controllers\Wx\GetUserController::class,'getUser']);
});
Route::get('getAuth',[\App\Http\Controllers\Wx\GetUserController::class,'getAuth']);
//创建自定义菜单
Route::prefix('wx')->group(function(){
    Route::get('custom_menu',[\App\Http\Controllers\Wx\CustomMenuController::class,'create']);
    Route::get('custom_list',[\App\Http\Controllers\Wx\CustomMenuController::class,'list']);
    Route::get('code',[\App\Http\Controllers\Wx\CustomMenuController::class,'createCodeB']);
});


//访问日志
Route::get('logs', ['\Rap2hpoutre\LaravelLogViewer\LogViewerController','index']);

Route::get('/sun/test',[\App\Http\Controllers\SunController::class,'index']);

